package com.hs.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @ClassName Article
 * @Description TODO
 * @Author libowen
 * @Date 2025年08月01日 10:35
 * @Version 1.0
 */
@Data
public class Article {
    private int id;
    private String title;
    private String subtitle;
    private String content;
    private String listImage;
    private int likes;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date publishTime;
    private String author;
    private int typeId;   // 外键

    // 扩展一个所属的文章分类对象
    private ArticleType type;

}
